//变量
@import "variables";
// 函数
@import "functions";
//基本样式
@import "base";

.swiper-container {
  padding-bottom: 0px !important;
  .swiper-wrapper {
    .swiper-slide {
      background-color: #ccc;
      background-size: cover;
      height: 9rem;
      .text {
        padding: 10px;
        font-size: 18px;
        line-height: 1.5;
        color: #fff;
        position: absolute;
        bottom: -20px;
      }
    }
  }
  .swiper-pagination {
    bottom: -4px !important;
  }
}

.news-list {
  .news-cat {
    font-size: 14px;
    display: flex;
    flex: 1;
    border-bottom: 1px solid #f7f7f7;
    .left {
      flex: 1;
      p {
        margin: 15px 10px;
        text-indent: 5px;
        border-left: 2px solid #02A9F4;
      }
    }
    .actions {
      //flex: 0 0 210px;
      margin: 15px 10px;
      a {
        font-size: 12px;
        color: #ccc;
        line-height: 30px;
        margin-left: 5px;
      }
      .icon {
        background-size: 15px;
        background-position: bottom;
        height: 20px;
      }
    }
  }
  > div {
    margin-top: 10px;
    background-color: #fff;
    position: relative;
  }
  position: relative;

  .article-cover {
    height: 100px;
    width: 100px;
    background-size: cover;
  }
  .right {
    img {
      width: rem(100);
      height: rem(100);
      display: block;
      background-color: #ccc;
    }
  }
  .action {
    padding-left: 10px;
    position: absolute;
    bottom: 0px;
  }
  .text {
    font-size: rem(16);
    color: $color-primary;
    line-height: rem(22);
    height: rem(54);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    padding: 10px;
  }
  .author {
    position: absolute;
    right: rem(100);
    bottom: 5px;
    font-size: 14px;
    line-height: 2;
    padding-right: 10px;
  }
  & .text-plain {
    height: rem(100);
    .author {
      right: 10px;
    }
  }
}

.icon-btn a {
  color: #707070;
  font-size: rem(10);
}

.icon {
  display: inline-block;
  height: 18px;
  width: 20px;
  line-height: 10px;
  vertical-align: 0;
  background-repeat: no-repeat;
  background-size: 18px;
  margin-right: 5px;
}

.bar-tab {
  height: 50px;
  .icon {
    margin-right: 0px;
    height: 30px !important;
    width: 30px !important;
    background-size: 25px !important;
    background-position: bottom;
  }
  .icon-bar-home {
    background-image: url(../wap-images/home_unclick@3x.png);
  }
  .icon-bar-discover {
    background-image: url(../wap-images/discover_unclick@3x.png);
  }
  .icon-bar-publish {
    background-image: url(../wap-images/publish_unclick@3x.png);

  }
  .icon-bar-me {
    background-image: url(../wap-images/mine_unclick@3x.png);
  }
  .active {
    .icon-bar-home {
      background-image: url(../wap-images/home_click@3x.png);
    }
    .icon-bar-discover {
      background-image: url(../wap-images/discover_click@3x.png);
    }
    .icon-bar-publish {
      background-image: url(../wap-images/publish_click@3x.png);
    }
    .icon-bar-me {
      background-image: url(../wap-images/mine_click@3x.png);
    }
  }
  .tab-label {
    top: -4px !important;
  }
}

.icon-like {
  background-image: url(../wap-images/praise_unclick@3x.png);
}

.icon-comment {
  background-image: url(../wap-images/comment@3x.png);
}

.icon-male {
  background-image: url(../wap-images/male@3x.png);
}

.icon-female {
  background-image: url(../wap-images/female@3x.png);
}

.icon-edit-me {
  background-image: url(../wap-images/change@3x.png);
}

.icon-my-bell {
  background-image: url(../wap-images/message@3x.png);
}

.icon-my-collect {
  background-image: url(../wap-images/collect@3x.png);
}

.icon-my-published {
  background-image: url(../wap-images/minepublish@3x.png);
}

.icon-my-likes {
  background-image: url(../wap-images/mineprise@3x.png);
}

.icon-arrow-left {
  background-image: url(../wap-images/back@3x.png);
}

.icon-collect {
  background-image: url(../wap-images/collect_unclick@3x.png);
  &.active {
    background-image: url(../wap-images/collect@3x.png);
  }
}

.icon-hot {
  background-image: url(../wap-images/hot_unclick@3x.png);
  &.active {
    background-image: url(../wap-images/hot_click@3x.png);
  }
}

.icon-time {
  background-image: url(../wap-images/time_unclick@3x.png);
  &.active {
    background-image: url(../wap-images/time_click@3x.png);
  }
}

.icon-more {
  background-image: url(../wap-images/more__unclick@3x.png);
}

.icon-my-share {
  background-image: url(../wap-images/share@3x.png);
}

.icon-my-advice {
  background-size: 18px !important;
  background-image: url(../wap-images/icon-advice.png);
}

.icon-my-category {
  background-size: 18px !important;
  background-image: url(../wap-images/icon-my-category.png);
}

.icon-my-publish {
  background-size: 18px !important;
  background-image: url(../wap-images/icon-my-publish.png);
}

.icon-edit-image {
  background-image: url(../wap-images/modify@3x.png);
}

.icon-ppt {
  background-image: url(../wap-images/icon-ppt.png);
}

.icon-audio {
  background-image: url(../wap-images/icon-audio.png);
}

.icon-video {
  background-image: url(../wap-images/icon-video.png);
}

//我的
.user-index {
  background-color: #fff;
  text-align: center;
  color: $color-primary;
  padding-bottom: 10px;
  .edit {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  .head {
    text-align: center;
    img {
      background-color: #ccc;
      border-radius: 50%;
      height: rem(98);
      width: rem(98);
      margin-top: 40px;
    }
  }
  .name {
    margin: 0px;
    font-size: 16px;
    line-height: 2;
    span {
      position: relative;
      .icon {
        top: 0px;
        position: absolute;
        width: 20px;
        background-size: 15px;
        background-position: right top;
      }
    }
  }
  .job-title {
    margin: 0px;
    font-size: 14px;
    line-height: 1.8;
    span {
      padding: 10px;
    }
  }
}

// 头像
.user-avatar {
  .avatar-list {
    p {
      color: $color-primary;
      font-size: 16px;
    }
    ul {
      padding: 0px;
      margin: 0px;
      list-style: none;
      display: flex;
      flex: 1;
      flex-wrap: wrap;
      li {
        padding: 5px;
        flex: 0 0 20%;
        border-radius: 50%;
        img {
          width: 100%;
          height: inherit;
          border-radius: 50%;
          border: 2px solid transparent;
        }
        &.active {
          img {
            border: 2px solid #ff8269;
          }
        }
      }
    }
  }
}

.wap-user .list-block {
  margin: 15px 0px;
  .icon {
    background-size: 15px;
  }
}

//新闻详情页
.article-show {
  .cover {
    height: 200px;
    overflow: hidden;
    background-size: cover;
  }
  .content {
    background-color: #fff;
  }
  .main {
    padding: 20px {
      top: 0px;
    }
  }
  h2 {
    text-align: left;
    color: $color-primary;
    font-size: 20px;
    line-height: 1.5;
    font-weight: normal;
  }
  .author {
    font-size: 12px;
    color: $color-athor;
  }
  .attachments {
    ul {
      margin: 0px;
      padding: 0px;
      list-style: none;
    }
    li {
      margin-bottom: 10px;
      height: 50px;
      border-radius: 5px;
      background-color: #f5f5f5;
      display: flex;
      flex: 1;
      .extension-icon {
        flex: 0 0 100px;
        .icon {
          height: 50px;
          width: 60px;
          background-size: 30px;
        }
      }
      .name {
        text-align: right;
        flex: 1;
        padding-right: 20px;
        color: $color-primary;
        font-size: 14px;
        line-height: 50px;
      }
    }
  }
  .body {
    color: $color-body;
    line-height: 1.8;
    img {
      max-width: 100% !important;
      height: inherit;
    }
  }

}

//share popup
.popup-share {
  background-color: transparent;
  .share-content {
    position: absolute;
    bottom: 0px;
    background-color: #fff;
    width: 100%;
  }
  .share-title {
    text-align: center;
    font-size: 16px;
    line-height: 2;
    color: $color-primary;
  }
  .share-icons {
    display: flex;
    flex-wrap: wrap;
    .cell {
      text-align: center;
      flex: 1;
      flex: 0 0 33.33333%;
      font-size: 12px;
      color: #ababab;
      margin-bottom: 15px;
      .icon {
        margin: 0px;
        width: 100%;
        height: 50px;
        background-size: 40px;
        background-repeat: no-repeat;
        background-position: center;
      }
      .weibo {
        background-image: url(../wap-images/weibo@3x.png);
      }
      .moments {
        background-image: url(../wap-images/friend@3x.png);
      }
    }
  }
  .list-block {
    margin: 0px {
      top: 5px;
    }
    a {
      color: #ababab;
    }
  }
}

.popup-comment {
  header {
    button {
      border: none;
    }
  }
  .edit-area {
    padding: 10px;
    width: 100%;
    textarea {
      width: 100%;
      height: 100px;
      border: none;
      font-size: 16px;
      color: #666;
      line-height: 2;
      border-radius: 0px;
      border-bottom: 1px solid #ccc;
    }
  }
}

.popup-reply {
  header {
    button {
      border: none;
    }
  }
  .edit-area {
    padding: 10px;
    width: 100%;
    height: 100%;
    textarea {
      width: 100%;
      height: 100%;
      border: none;
      font-size: 16px;
      color: #666;
      line-height: 2;
    }
  }
}

// 评论bar
.comment-bar {
  background-color: #fff;
  padding: 10px 5px;
  border-bottom: none;
  display: flex;
  .cell {
    flex: 1;
  }
  .icon {
    width: 20px !important;
    background-size: 20px !important;
    background-position: center !important;
  }
  .back {
    flex: 0 0 30px;
    .icon {
      margin-top: 0px;
      margin-left: 3px;
      background-size: 12px !important;
    }
  }
  .actions {
    padding-left: 10px;
    flex: 0 0 90px;
    a {
      margin-left: 8px;
      position: relative;
      label {
        position: absolute;
        right: -6px;
        top: -5px;
        font-size: 10px;
        line-height: 1;
        background-color: #ff8269;
        color: #fff;
        padding: 1px 4px;
        border-radius: 5px;
      }
    }
  }
  .input-div {
    input[type=text] {
      text-indent: 10px;
      border-radius: 5px;
      font-size: 14px;
      color: #c7c7c7;
      border: none;
      background-color: #f5f5f5;
      padding: 3px;
      height: 30px;
      width: 100%;
    }
  }
  &.bar:after {
    background-color: #fff;
  }
}

// 评论列表页
.article-comments {
  .comment-null {
    padding-top: 30%;
    .icon {
      height: 65px;
      width: 100%;
      background: url(../wap-images/face_1@3x.png) no-repeat center;
      background-size: 60px;
    }
    .button {
      display: inline-block;
    }
  }
}

.comments {
  background-color: #fff;
  //padding-left: 20px;
  .cat {
    padding-left: 20px;
    font-size: rem(16);
    line-height: 2.5;
    color: $color-cat;
    border-bottom: 1px solid #ddd;
  }
  ul.parent {
    padding-left: 20px;
    > li {
      display: flex;
      flex: 1;
      padding-top: 10px;
      border-bottom: 1px solid #ddd;
      .left {
        flex: 0 0 50px;
        img {
          background-color: #ccc;
          border-radius: 50%;
        }
      }
      .right {
        flex: 1;
        .btn-comment-actions .click-area {
          &:active {
            background-color: rgba(243, 243, 243, 0.95);
          }
        }
        .nickname {
          margin: 0px;
          color: $color-nickname;
          font-size: 14px;
        }
        .time {
          color: $color-time;
          font-size: 12px;
        }
        .text {
          margin: 0px;
          padding-right: 20px;
        }
        ul.replies {
          list-style: none;
          border-left: 2px solid #02A9F4;
          font-size: 14px;
          color: #707070;
          padding-left: 10px;
          li {
            padding-top: 5px;
            padding-bottom: 5px;
          }
        }
        .actions {
          padding: 10px;
          float: right;
        }
      }
    }
  }
}

// 消息中心
.notifications {
  background-color: #fff;
  ul.parent {
    padding-left: 20px;
    > li {
      display: flex;
      flex: 1;
      padding-top: 10px;
      border-bottom: 1px solid #ddd;
      .left {
        flex: 0 0 50px;
        img {
          background-color: #ccc;
          border-radius: 50%;
        }
      }
      .right {
        .nickname {
          margin: 0px;
          color: $color-nickname;
          font-size: 14px;
        }
        .time {
          color: $color-time;
          font-size: 12px;
        }
        .text {
          margin: 0px;
          padding-right: 20px;
          padding-bottom: 10px;
        }
      }
    }
  }
}

// 发现
.discover {
  .all-cats {
    display: flex;
    .left {
      &.scroll-departments {
        overflow-y: scroll;
      }
      ul {
        text-align: center;
        margin-top: 0px;
        padding-left: 0px;
        color: $color-primary;
        li {
          border-top: 1px solid #fff;
          background-color: #f5f5f5;
          border-left: 3px solid #f5f5f5;
          padding: 15px 20px;
          font-size: 14px;
          list-style: none;
          &.active {
            color: $color-active;
            background-color: #fff;
            border-left: 3px solid $color-active;
          }
        }
      }
      text-align: center;
      margin-top: 0px;
      padding-left: 0px;
      color: $color-primary;
      li {
        border-top: 1px solid #fff;
        background-color: #f5f5f5;
        border-left: 3px solid #f5f5f5;
        padding: 15px 20px;
        font-size: 14px;
        list-style: none;
        &.active {
          color: $color-active;
          background-color: #fff;
          border-left: 3px solid $color-active;
        }
      }
    }
    .right {
      overflow-y: scroll;
      flex: 1;
      .job-title {
        padding-top: 10px;
        color: $color-primary;
        text-align: center;
        font-size: 13px;
      }
      ul {
        padding-left: 10px;
        margin: 0px;
        list-style: none;
        li {
          font-size: 12px;
          color: #484848;
          background-color: #f5f5f5;
          display: inline-block;
          padding: 8px 15px;
          margin-bottom: 5px;
          &.active {
            background-color: $color-active;
            color: #fff;
          }
        }
      }
    }
  }
}

// 发现 - 我的
.discover-mine {
  header {
    background-color: #fff;
    height: auto;
    padding-bottom: 10px;
    ul.departments {
      width: 300%;
      margin: 0px;
      padding-left: 0px;
      overflow: hidden;
      list-style: none;
      height: 40px;
      li {
        float: left;
        margin: 0px 5px;
        font-size: 14px;
        line-height: 38px;
        color: $color-primary;
        &.active {
          color: $color-active;
          border-bottom: 2px solid $color-active;
        }
      }
    }
    .scroll-job-titles {
      display: none;
      &:first-child {
        display: block;
      }
    }
    .job-title {
      width: 300%;
      padding: 0px {
        top: 10px;
      }
      margin: 0px;
      list-style: none;
      li {
        margin: 0px 4px;
        float: left;
        color: #707070;
        font-size: 13px;
        line-height: 1;
        background-color: #f7f7f8;
        padding: 5px 10px;
        &.active {
          color: $color-active;
        }
      }
    }
    .btn-right {
      text-align: center;
      height: 100%;
      width: 50px;
      position: absolute;
      right: 0px;
      top: 0px;
      .icon {
        box-shadow: -5px -1px 5px #ddd;
        background-color: #fff;
        height: 40px;
        width: 50px;
      }
    }
  }
  .news-list {
    > div {
      margin-top: 0px;
      border-bottom: 1px solid #f7f7f7;
    }
    .news-cat {
      margin-top: 15px;
    }
  }
}

.collections {
  .collections-null {
    padding-top: 30%;
    .thumb {
      height: 65px;
      background: url(../wap-images/face_3@3x.png) no-repeat center;
      background-size: 65px;
    }
  }
}

.publish {
  .publish-null {
    padding-top: 30%;
    .thumb {
      height: 65px;
      background: url(../wap-images/face_4@3x.png) no-repeat center;
      background-size: 65px;
    }
  }
}

.published {
  .published-null {
    padding-top: 30%;
    .thumb {
      height: 65px;
      background: url(../wap-images/face_2@3x.png) no-repeat center;
      background-size: 65px;
    }
  }
}

.user-profile {
  .edit-head {
    padding: 50px 0px;
    text-align: center;
    .show-head {
      position: relative;
      display: inline-block;
      height: 98px;
      width: 98px;
      img {
        background-color: #ccc;
        height: 100%;
        width: 100%;
        border-radius: 50%;
      }
      .edit {
        position: absolute;
        right: -10px;
        bottom: -5px;
        .icon {
          background-size: 28px;
          height: 30px;
          width: 30px;
        }
      }
    }
  }
}

.list-block {
  margin-top: 0px;
  font-size: 16px;
  .item-title {
    color: $color-primary;
  }
  .item-after {
    color: #ccc;
  }
  .item-input {
    input {
      font-size: 16px;
    }
  }
}


